package com.org.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.org.bean.setting.PersonInfo;
import com.org.dao.setting.PersonInfoMapper;
import com.org.service.PersonService;

@Service("personService")
public class PersonServiceimpl implements PersonService {
	@Autowired
	private PersonInfoMapper personInfoMapper;

	@Override
	public List<PersonInfo> findAll() {
		// TODO Auto-generated method stub
		return personInfoMapper.findAll();
	}

	@Override
	public List<PersonInfo> findById(int personId) {
		// TODO Auto-generated method stub
		return personInfoMapper.findById(personId);
	}

	@Override
	public boolean addPerson(PersonInfo personInfo) {
		// TODO Auto-generated method stub
		return personInfoMapper.addPerson(personInfo);
	}

	@Override
	public boolean deletePerson(int personId) {
		// TODO Auto-generated method stub
		return personInfoMapper.deletePerson(personId);
	}

	@Override
	public boolean updatePerson(PersonInfo personInfo) {
		// TODO Auto-generated method stub
		return personInfoMapper.updatePerson(personInfo);
	}

	@Override
	public List<PersonInfo> findContact(String personName) {
		// TODO Auto-generated method stub
		return personInfoMapper.findContact(personName);
	}

}
